From 497a93c1d162c87ba4061c952fca4b1a4d77b541 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 10 Jan 2006 14:14:55 +0000 Subject: [PATCH] Vaporize record delimiters from fields when writing Ozi. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1679 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/ozi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gpsbabel/ozi.c b/gpsbabel/ozi.c index f4d0f509c..31cf3fc03 100644 --- a/gpsbabel/ozi.c +++ b/gpsbabel/ozi.c @@ -28,6 +28,7 @@ #include /* for floor */ #define MYNAME "OZI" +#define BADCHARS ",\n" typedef struct { format_specific_data fs; @@ -534,7 +535,7 @@ ozi_parse_routepoint(int field, char *str, waypoint * wpt_tmp) break; case 13: /* description */ - wpt_tmp->description = csv_stringclean(str, ","); + wpt_tmp->description = csv_stringclean(str, BADCHARS); break; default: break; @@ -700,23 +701,23 @@ ozi_waypt_pr(const waypoint * wpt) if (global_opts.synthesize_shortnames) shortname = mkshort_from_wpt(mkshort_handle, wpt); else - shortname = csv_stringclean(wpt->description, ","); + shortname = csv_stringclean(wpt->description, BADCHARS); } else { /* no description available */ shortname = xstrdup(""); } } else { - shortname = csv_stringclean(wpt->shortname, ","); + shortname = csv_stringclean(wpt->shortname, BADCHARS); } if (!wpt->description) { if (shortname) { - description = csv_stringclean(shortname, ","); + description = csv_stringclean(shortname, BADCHARS); } else { description = xstrdup(""); } } else { - description = csv_stringclean(wpt->description, ","); + description = csv_stringclean(wpt->description, BADCHARS); } index++; -- 2.30.2